import pandas as pd
from flask import Flask, render_template

datas = {}
df = pd.read_csv('data/房源数量占比.csv')
df = df.sort_values('房源数量分布占比', ascending=False)

for item in df.head(10).values:
    datas[item[0]] = item[1]

app = Flask(__name__)


@app.route('/')
def index():
    return render_template('房源占比前十南丁格尔玫瑰图.html', datas=datas)


if __name__ == '__main__':
    app.run(debug=True)
